package com.weds.edjk .service;

import com.weds.core.base.BaseService;
import com.weds.edjk.entity.KtRecordEntity;
import com.weds.edjk.entity.UserFxEntity;
import com.weds.edjk.mapper.KtRecordMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @Author zcz
 * @Description KtRecord管理
 * @Date 2020-06-06
 */
@Service
public class KtRecordService extends BaseService {

	@Autowired
	private KtRecordMapper ktRecordMapper;

	private Logger log = LogManager.getLogger();

	public int deleteByPrimaryKey(Date sj, Integer userSerial, Integer bh) {
		return ktRecordMapper.deleteByPrimaryKey(sj, userSerial, bh);
	}

	public int insert(KtRecordEntity record) {
		return ktRecordMapper.insert(record);
	}

	public int insertSelective(KtRecordEntity record) {
		return ktRecordMapper.insertSelective(record);
	}

	public KtRecordEntity selectByPrimaryKey(Date sj, Integer userSerial, Integer bh) {
		return ktRecordMapper.selectByPrimaryKey(sj, userSerial, bh);
	}

	public int updateByPrimaryKeySelective(KtRecordEntity record) {
		return ktRecordMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(KtRecordEntity record) {
		return ktRecordMapper.updateByPrimaryKey(record);
	}

    	public List<KtRecordEntity> selectListByEntity(KtRecordEntity record) {
		return ktRecordMapper.selectListByEntity(record);
	}
	
	

        public int deleteBatchByKeys(List<KtRecordEntity> list) {
        return ktRecordMapper.deleteBatchByKeys(list);
    }
    
    	public int insertBatch(List<KtRecordEntity> list) {
		return ktRecordMapper.insertBatch(list);
	}

	public int countTodayFx(Date sj, Short fx) {
		return ktRecordMapper.countTodayFx(sj, fx);
	}

	public List<UserFxEntity> selectTodayFx(@Param("sj") Date sj) {
		return ktRecordMapper.selectTodayFx(sj);
	}

	}
